using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication11.Models.Mapping
{
    public class HospitalPhoneMap : EntityTypeConfiguration<HospitalPhone>
    {
        public HospitalPhoneMap()
        {
            // Primary Key
            this.HasKey(t => t.HPn_ID);

            // Properties
            this.Property(t => t.HPn_Phonel)
                .HasMaxLength(20);

            // Table & Column Mappings
            this.ToTable("HospitalPhone");
            this.Property(t => t.HPn_ID).HasColumnName("HPn_ID");
            this.Property(t => t.node_id).HasColumnName("node_id");
            this.Property(t => t.HPn_Phonel).HasColumnName("HPn_Phonel");
        }
    }
}
